package com.boho.ecp.manage.integral.service;

import java.sql.Connection;
import java.util.Date;

import cn.boho.framework.po.POUtils;

import com.boho.ecp.po.TPointsChangePO;

public class PointService {

	/**
	 * 新增会员积分
	 * @param con
	 * @param memberId
	 * @param details
	 * @param pointType
	 * @param pointItem
	 * @param points
	 * @param date
	 * @param remark
	 * @param operator
	 * @throws Exception
	 */
	public static void addPoint(Connection con, Integer memberId, String details, String pointType, String pointItem,
			Integer points, Date date, String remark, String operator) throws Exception{
		TPointsChangePO pointsChangePO = new TPointsChangePO();
		pointsChangePO.setMemberId(memberId);
		pointsChangePO.setPointChangeType(pointType);
		pointsChangePO.setPointChangeItem(pointItem);
		pointsChangePO.setPointChangeDetails(details);
		pointsChangePO.setPoints(points);
		pointsChangePO.setChangeDate(date);
		pointsChangePO.setRemarks(remark);
		pointsChangePO.setCreateBy(operator);
		pointsChangePO.setCreateDate(date);
		POUtils.insert(con, pointsChangePO, false);
	}
	
}
